home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Camelot / Camelot 043 (1989-06)(Swedish User Group of Amiga)(SE)(PD)[WB].zip / Camelot 043 (1989-06)(Swedish User Group of Amiga)(SE)(PD)[WB].adf / zc / bstok.h < prev    next >
C/C++ Source or Header  |  1989-03-08  |  1KB  |  54 lines

  1. /* Copyright (c) 1988 by Sozobon, Limited.  Author: Johann Ruegg
  2.  *
  3.  * Permission is granted to anyone to use this software for any purpose
  4.  * on any computer system, and to redistribute it freely, with the
  5.  * following restrictions:
  6.  * 1) No charge may be made other than reasonable charges for reproduction.
  7.  * 2) Modified versions must be clearly marked as such.
  8.  * 3) The authors are not responsible for any harmful consequences
  9.  *    of using this software, even if they result from defects in it.
  10.  *
  11.  *    bstok.h
  12.  *
  13.  *    basic token values
  14.  *    (some compilers cant do enums, so use defines)
  15.  */
  16.  
  17. #ifndef ENUMS
  18. #define BADTOK    0
  19. #define ID    1
  20. #define ICON    2
  21. #define FCON    3
  22. #define SCON    4
  23. #define DPARAM    6    /* parameter to #define */
  24. #define EOFTOK    7
  25. #define POSTINC 8    /* DOUBLE '+' is pre-inc */
  26. #define POSTDEC 9    /* DOUBLE '-' is pre-dec */
  27. #define TCONV    10    /* coertion */
  28. #define TSIZEOF 11    /* sizeof(type expr) */
  29. #define NL    12
  30. #define WS    13    /* white space */
  31. #define SCON2    14    /* <string> */
  32. #define PTRDIFF 0x18
  33. #define PTRADD    0x19
  34. #define PTRSUB    0x1a
  35. #define ARROW    0x1b
  36. #define LTEQ    0x1c
  37. #define GTEQ    0x1d
  38. #define NOTEQ    0x1e
  39. #else
  40. enum {
  41.     BADTOK, ID, ICON, FCON, SCON, DPARAM, EOFTOK,
  42.     POSTINC, POSTDEC, TCONV, TSIZEOF, NL, WS, SCON2,
  43.     PTRDIFF, PTRADD, PTRSUB, ARROW, LTEQ, GTEQ, NOTEQ
  44. };
  45. #endif
  46.  
  47. #define ASSIGN    0x100+    /* add to char of op */
  48. #define DOUBLE    0x80+
  49. #define UNARY    0x200+
  50.  
  51. #define STAR    (UNARY '*')    /* used a lot */
  52.  
  53. #define isassign(x)    (x >= 0x100)
  54.